package xyz.wongs.gry.synx.index
/**
 * @ClassName
 * @Description
 * @author WCNGS@QQ.COM
 * @Github <a> https://github.com/rothschil</a>
 * @date 2020/12/21 10:58
 * @Version 1.0.0
 */

def closMethod1={ String ww ->
    return ww + "WONGS.xyz"
}

println("[closMethod1 闭包] "+ closMethod1("wwww."))

def closMetho2={ int ... args ->
    def sum = 0
    for(int i: args)
        sum += i
    return sum
}

println("[closMetho2 闭包] "+ closMetho2(1,2,3))


def closMetho3={
    return "【当前反馈内容】 WONGS" + it
}

println("[closMetho3 闭包] "+ closMetho3())
println("[closMetho3 闭包] "+ closMetho3("www."))

def closMetho4={
    "【当前反馈内容】 WONGS" + it
}

println("[closMetho4 闭包] "+ closMetho4())
println("[closMetho4 闭包] "+ closMetho4("www."))